<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Goods extends Model
{

    protected $fillable = ['company','name','code','type','brand', 'size','color','unit','count','salePrice','storage','info','price','discount','inPrice', 'cost','costUnit', 'log', 'img','img1','img2', 'notes','content'];

    public function colors()
    {
        return $this->hasMany('App\GoodsColors', 'pid');
    }
    public function sizes()
    {
        return $this->hasMany('App\GoodsSizes', 'pid');
    }
    public function pics()
    {
        return $this->hasMany('App\Pic', 'pid');
    }
}
